<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>static:{{static| toChina("hi","210")}}</p>
        <input type="button" value="修改" @click="change">
    </div>
</body>
<script src="./vue.js"></script>
<script>

    //全局定义过滤器
    Vue.filter("toChina",function(value,a,b){
        console.log("过滤器调用l");
        switch(value){
            case 0:return "未处理";
            case 1:return "处理中";
            case 2:return "已处理";

        }
    })




    let vm = new Vue({
        el:"#app",
        data:{
            static:0
        },
        methods:{
            change(){
                this.static = 2
            }
        }
    })


</script>
</html>